﻿using Microsoft.Extensions.Configuration;
using MiniFox.Configurations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace SwaggerUI
{
    /// <summary>
    /// 
    /// </summary>
    [Section(ELEMENT_NAME)]
    public sealed class SwaggerConfiguration
    {
        internal const string ELEMENT_NAME = "minifox:swagger";

        /// <summary>
        /// 文件列表，必须是xml文件全路径
        /// </summary>
        [ConfigurationKeyName("paths")]
        public string[] FilePathSettings
        {
            get;
            set;
        } = Array.Empty<string>();
        /// <summary>
        /// 应用程序名称
        /// </summary>
        [ConfigurationKeyName("name")]
        public string Name
        {
            get;
            set;
        } = string.Empty;
        /// <summary>
        /// 应用程序版本号
        /// </summary>
        [ConfigurationKeyName("version")]
        public string Version
        {
            get;
            set;
        } = "v1";
        /// <summary>
        /// XML文档存放的目录（物理相对路径，默认值：""）
        /// </summary>
        [ConfigurationKeyName("basePath")]
        public string BasePath
        {
            get;
            set;
        } = string.Empty;
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("disableFetch")]
        public bool DisableFetch
        {
            get;
            set;
        }
    }
}
